import { Module } from '@nestjs/common';
import { ScheduleModule } from '@nestjs/schedule';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SchedulerService } from './scheduler.service';
import { SchedulerController } from './scheduler.controller';
import { UserLog } from '../user-log/entities/user-log.entity';
import { SecurityLog } from '../security-log/entities/security-log.entity';
import { UserLogService } from '../user-log/services/user-log.service';
import { SecurityLogService } from '../security-log/services/security-log.service';
import { SecurityLogModule } from '../security-log/security-log.module';

@Module({
  imports: [
    ScheduleModule.forRoot(),
    TypeOrmModule.forFeature([UserLog, SecurityLog]),
    SecurityLogModule,
  ],
  controllers: [SchedulerController],
  providers: [SchedulerService, UserLogService, SecurityLogService],
  exports: [SchedulerService],
})
export class SchedulerModule {}
